package com.qianli.cashmama.product.facade.enums;

import com.fqgj.common.api.enums.MsgCodeEnum;

/**
 * Created by xuyang on 2017/7/19.
 */
public enum ErrorCodeEnum implements MsgCodeEnum {
    PRODUCT_NOT_FOUND(800001, "The product has been removed or has not taken effect"),                  //产品已经下架或者未生效
    PRODUCT_CATEGORY_NOT_ON_SELL(800002, "Product category has been removed"),                          //产品类目已经下架
    INVALID_PRODUCT_RULE(800003, "Invalid product rule"),                                               //无效的产品规则
    INVALID_RULE_OWNER_TYPE(800004, "Invalid rule owner type"),                                         //无效的规则所有者类型
    INVALID_SELLING_STATUS(800005, "Invalid shelf status"),                                             //无效的上架状态
    INVALID_INTEREST_STRATEGY(800006, "Invalid interest rate"),                                         //无效的计息方式
    INVALID_PAYBACK_PERIOD_UNIT(800007, "Invalid repayment period unit"),                               //无效的还款周期单位
    INVALID_PRODUCT_CODE(800008, "Invalid product code"),                                               //无效的产品编码
    INVALID_PRODUCT_CATEGORY_CODE(800009, "Invalid product category code"),                             //无效的产品类目编码
    INVALID_APP_CODE(800010, "Invalid application code"),                                               //无效的应用编码
    APP_PRODUCT_CATEGORY_LIST_NOT_FOUND(800011, "No product category list found for the app"),          //未找到应用的产品类目列表
    PRODUCT_CATEGORY_WAS_DELETED(800012, "The category to which the product belongs has been deleted or does not exist"),//产品所属类目已经被删除或者不存在
    PRODUCT_WAS_DELETED(800013, "Product has been deleted or does not exist"),//产品已经被删除或者不存在
    INVALID_MERCHANT_CODE(800014, "merchant can not be empty");//产品已经被删除或者不存在


    private Integer code;

    private String msg;

    ErrorCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
